summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryaideltg <github.j9jab@aleeas.com>2023-05-14 10:10:13 +0200
committeryaideltg <github.j9jab@aleeas.com>2023-05-14 10:10:13 +0200
commitd32d463f72a7e5df6f2fd16ecb3301c50e13367b (patch)
tree1fa3872fd5f518224e3cc68d296e4e0797a5d8d4
parentd1f09edab9e71a7f4292096021fdd4c667136918 (diff)
downloadconfiguration files-d32d463f72a7e5df6f2fd16ecb3301c50e13367b.tar.gz
configuration files-d32d463f72a7e5df6f2fd16ecb3301c50e13367b.tar.bz2
configuration files-d32d463f72a7e5df6f2fd16ecb3301c50e13367b.zip
Added the Latex styles and visual-line-mode hook for org documents
-rw-r--r--emacs_init/dot_emacs.org20
-rw-r--r--latex_styles/article_sty.sty94
-rw-r--r--latex_styles/cv_sty.sty131
-rw-r--r--latex_styles/thesis_sty.sty145
4 files changed, 381 insertions, 9 deletions
diff --git a/emacs_init/dot_emacs.org b/emacs_init/dot_emacs.org
index c970d84..92923d1 100644
--- a/emacs_init/dot_emacs.org
+++ b/emacs_init/dot_emacs.org
@@ -664,6 +664,7 @@ because it uses [[*Denote][Denote's]] tags in the file name to detect the projec
:ensure t
:hook
(org-mode . flyspell-mode)
+ (org-mode . visual-line-mode)
:config
(setq org-startup-indented t) ;; Activating Org Indent Mode by default
@@ -983,6 +984,7 @@ Facilitating the automatic loggin to the IRC server by using auth-source library
#+begin_src emacs-lisp
(use-package denote
:ensure t
+ :demand t
:config
;;
;; General key bindings
@@ -995,7 +997,8 @@ Facilitating the automatic loggin to the IRC server by using auth-source library
(setq denote-org-front-matter
"#+title: %s\n#+date: %s\n#+filetags: %s\n#+identifier: %s\n#+author: yaidel\n#+startup: content\n\n")
:bind
- ("C-c n n" . denote-open-or-create)
+ ("C-c n f" . denote-open-or-create)
+ ("C-c n n" . denote)
("C-c n l" . denote-link-or-create)
("C-c n B" . denote-link-find-file)
("C-c n b" . denote-link-backlinks)
@@ -1075,8 +1078,6 @@ Anyhow, the files will be deleted once emacs is closed and reopened, due to the
;; (add-hook 'after-save-hook #'my-denote-remove-from-agenda)
#+end_src
------------
-
Furthermore, to those using Org-roam, https://d12frosted.io/ has a perfect solution to add files with TODOs to
the =org-agenda-files= variable. In fact, that solution is much better than adding all files with the
=_project= keyword in their name, but it is not possible to implement while using Denote. Because Denote do
@@ -1089,21 +1090,22 @@ Define a function to handle the creation of the journal entry:
#+begin_src emacs-lisp
(defun my-denote-journal ()
- "Check if a file containing the given string exists in the
- directory and open it in a new buffer.
- If the file does not exist, create it with a 'denote' string."
+ "Create an entry tagged 'journal' with the date as its title.
+ If a journal for the current day exists, visit it. If multiple
+ entries exist, prompt with completion for a choice between them.
+ Else create a new file."
(interactive)
- (let* ((string (denote-sluggify (format-time-string "%A %e %B %Y")))
+ (let* ((today (format-time-string "%A %e %B %Y"))
+ (string (denote-sluggify today))
(files (denote-directory-files-matching-regexp string)))
(cond
((> (length files) 1)
(find-file (completing-read "Select file: " files nil :require-match)))
(files
(find-file (car files)))
- ;; If we reach this point, the file doesn't exist, so we create it
(t
(denote
- (format-time-string "%A %e %B %Y") ; format the note's name like Tuesday 14 June 2022
+ today
'("journal"))))))
#+end_src
diff --git a/latex_styles/article_sty.sty b/latex_styles/article_sty.sty
new file mode 100644
index 0000000..6536a8e
--- /dev/null
+++ b/latex_styles/article_sty.sty
@@ -0,0 +1,94 @@
+\RequirePackage[style=numeric-comp,%
+sorting=none,%
+maxbibnames=3,%
+minbibnames=3,%
+maxcitenames=1,%
+mincitenames=1,%
+isbn=false,%
+url=false,%
+doi=false,%
+eprint=false,%
+related=false]{biblatex}
+\renewbibmacro{in:}{}
+
+\RequirePackage{tcolorbox}
+\newtcolorbox{abox}{colback=red!5!white, colframe=red!75!black, coltitle=red!80!black,
+ fonttitle=\bfseries, title=Attention, attach title to upper={\ --\ }}
+\newtcolorbox[auto counter]{ebox}[1]{colbacktitle=blue!10!white, colback=blue!5!white,coltitle=black,
+ title={Example~\thetcbcounter \ --\ #1},fonttitle=\bfseries}
+\newtcolorbox{nbox}{colback=green!0.5!white, colframe=green!75!black, coltitle=green!80!black,
+ fonttitle=\bfseries, title=Note, attach title to upper={\ --\ }}
+
+\RequirePackage[T1]{fontenc}
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{amsmath}
+\RequirePackage{amssymb}
+\RequirePackage{amsfonts}
+\RequirePackage{amssymb}
+\RequirePackage{amsthm}
+
+
+\RequirePackage[labelfont={rm},labelformat=parens,format=hang,parskip=5pt,subrefformat=subparens]{subfig}
+\RequirePackage[textfont={normalfont}, labelfont={sc,bf}, labelsep=period, parskip=1pt, aboveskip=5pt,
+indention=18pt]{caption}
+
+\RequirePackage{supertabular}
+\RequirePackage{booktabs}
+\RequirePackage{longtable}
+\RequirePackage{multirow}
+\RequirePackage[section]{placeins}
+\RequirePackage{xcolor}
+\RequirePackage[citecolor=blue, urlcolor=blue, colorlinks, linkcolor=black]{hyperref}
+\RequirePackage{varioref}
+%\labelformat{section}{secci{\'o}n~#1}
+%\labelformat{subsection}{secci{\'o}n~#1}
+%\labelformat{equation}{(#1)}
+%\labelformat{figure}{f\/igura~#1}
+%\labelformat{table}{tabla~#1}
+% Para modificar el separador de caption, ie. Figura 1. en lugar de Figura 1:
+
+
+\RequirePackage{kantlipsum}
+
+\RequirePackage{verbatim}
+\RequirePackage{shortvrb} % using \MakeShortVerb{\|} and \DeleteShortVerb{\|} you can define a new verbatim
+ % environment setter
+
+\RequirePackage[figuresleft]{rotating}
+\RequirePackage{graphicx}
+\RequirePackage{multicol}
+\RequirePackage{geometry}
+\geometry{
+ a4paper,
+ total={150mm,240mm},
+ left=20mm,
+ %top=20mm,
+}
+\parskip=1mm
+%\parindent=0mm
+
+\RequirePackage[all]{xy}
+
+% some defined commands
+\newcommand{\R}{\mathbb{R}}
+\newcommand{\Z}{\mathbb{Z}}
+\newcommand{\Q}{\mathbb{Q}}
+\newcommand{\N}{\mathbb{N}}
+\newcommand{\I}{\mathbb{I}}
+\newcommand{\raya}{\rule{2cm}{0.01cm}\\}
+\newcommand{\ds}{\displaystyle}
+\newcommand{\sen}{\mathop{\rm sen}\nolimits}
+%\newcommand{\tanh}{\mathop{\rm tan}\nolimits}
+\newcommand{\senh}{\mathop{\rm senh}\nolimits}
+\newcommand{\arcsen}{\mathop{\rm arcsen}\nolimits}
+\newcommand{\arcsec}{\mathop{\rm arcsec}\nolimits}
+\newcommand{\bc}{\begin{center}}
+\newcommand{\ec}{\end{center}}
+\newcommand{\be}{\begin{enumerate}}
+\newcommand{\ee}{\end{enumerate}}
+\newcommand{\A}{\,\textup{\r{A}}}
+\newcommand{\C}{\,^{\circ}C}
+\newcommand{\degree}{\,^{\circ}}
+\newcommand{\erfc}{\mathop{\rm erfc}\nolimits}
+\newcommand{\erf}{\mathop{\rm erf}\nolimits}
+\newcommand{\rb}[1]{\raisebox{-.4ex}[0pt]{#1}}
diff --git a/latex_styles/cv_sty.sty b/latex_styles/cv_sty.sty
new file mode 100644
index 0000000..b42c92b
--- /dev/null
+++ b/latex_styles/cv_sty.sty
@@ -0,0 +1,131 @@
+%% PACKAGES %%
+\RequirePackage[english]{babel} % multilingual support
+\RequirePackage[utf8]{inputenc} % encoding
+
+% Set the default font
+\RequirePackage{tgpagella}
+
+% set the page layout
+\RequirePackage{geometry}
+\geometry{
+ a4paper,
+ left=20mm,
+ %right=
+ %bottom=
+ top=15mm}
+
+% empty the headers, footers, pagenumbers…
+\pagestyle{empty}
+
+% Custom sectioning with secsty
+\RequirePackage{sectsty}
+
+% For links
+\RequirePackage[citecolor=blue, urlcolor=blue, colorlinks, linkcolor=black]{hyperref}
+
+\sectionfont{%
+ \large % make sections smaller
+ \fontfamily{qag}\selectfont % change font family
+ \sectionrule{0pt}{0pt}{-5pt}{1pt} % insert a thin rule
+}
+
+%% BIBLIOGRAPHY FOR PAPERS %%
+\RequirePackage[style=numeric-comp,%
+sorting=none,%
+maxbibnames=3,%
+minbibnames=3,%
+maxcitenames=1,%
+mincitenames=1,%
+isbn=false,%
+url=false,%
+doi=false,%
+eprint=false,%
+related=false]{biblatex}
+\renewbibmacro{in:}{}
+
+%% MACROS %%
+% size of the boxes used to align text
+\newlength{\spacebox}
+\settowidth{\spacebox}{12345678912345}
+% vertical space separator between entries
+\newcommand{\sepspace}{\vspace*{1em}}
+
+% name
+\newcommand{\name}[1]{
+\Huge % font size
+\fontfamily{phv}\selectfont % font family
+% print name centered and bold
+\begin{center} \textbf{#1} \end{center}\par
+% back to normal size and font
+\normalsize\normalfont}
+
+% motto
+\newcommand{\motto}[1]{
+ \large % font size
+ \fontfamily{phv}\selectfont % font family
+% print motto centered and slanted
+ \begin{center} \textsl{#1}\end{center}\par
+% back to normal size and font
+ \normalsize \normalfont}
+
+% personal information
+\newcommand{\info}[2]{
+ % set specific indentation for personal information
+ \noindent\hangindent=2em\hangafter=0
+ % create a box to align two pieces of text
+ \parbox{\spacebox}{%
+ \textsl{#1}} % slanted entry name
+ #2 \par} % entry value
+
+% skill
+\newcommand{\skill}[2]{
+ % set specific indentation for personal information
+ \noindent\hangindent=1em\hangafter=0
+ % create a box to align two pieces of text
+ \parbox{2.5\spacebox}{% three times larger box
+ \textsc{#1}} % small caps entry name
+ #2 \par} % entry value
+
+% language level
+\newcommand{\lang}[2]{
+ % set specific indentation for personal information
+ \noindent\hangindent=2em\hangafter=0
+ % create a box to align two pieces of text
+ \parbox{\spacebox}{%
+ \textbf{#1}} % bold font entry name
+ #2 \par} % entry value
+
+% education entry
+\newcommand{\education}[4]{
+ % name of the studies
+ \noindent \textbf{#1}
+ % at the right the duration
+ \hfill
+ \framebox{% duration inside a frame box
+ \parbox{7em}{%
+ \centering\textbf{#2}}} \par
+ % new paragraph with the school in italics
+ \vspace{0.5em} \noindent \textit{#3} \par
+ % description with no hanging and in smaller text
+ \vspace*{0.5em}
+ \noindent\hangindent=2em\hangafter=0 \small #4
+ % back to normal size
+ \normalsize \par}
+
+% work experience
+\newcommand{\work}[4]{
+ % name of the work
+ \noindent \textbf{#1}
+ % at the right the duration
+ \hfill
+ \framebox{% duration inside a frame box
+ \parbox{7em}{%
+ \centering\textbf{#2}}} \par
+ % new paragraph with the school in italics
+ \vspace{0.5em} \noindent \textit{#3} \par
+ % description with no hanging and in smaller text
+ \vspace*{0.5em}
+ \noindent\hangindent=2em\hangafter=0 \small #4
+ % back to normal size
+ \normalsize \par}
+
diff --git a/latex_styles/thesis_sty.sty b/latex_styles/thesis_sty.sty
new file mode 100644
index 0000000..1110b48
--- /dev/null
+++ b/latex_styles/thesis_sty.sty
@@ -0,0 +1,145 @@
+\RequirePackage[T1]{fontenc}
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{amsmath}
+\RequirePackage{amssymb}
+\RequirePackage{amsfonts}
+\RequirePackage{amssymb}
+\RequirePackage{amsthm}
+
+\RequirePackage[style=numeric-comp,%
+sorting=none,%
+maxbibnames=3,%
+minbibnames=3,%
+maxcitenames=1,%
+mincitenames=1,%
+isbn=false,%
+url=false,%
+doi=false,%
+eprint=false,%
+related=false]{biblatex}
+\renewbibmacro{in:}{}
+
+\RequirePackage[labelfont={rm},labelformat=parens,format=hang,parskip=5pt]{subfig}
+\RequirePackage[textfont={normalfont}, labelfont={sc,bf}, labelsep=period, parskip=1pt, aboveskip=5pt,
+indention=18pt]{caption}
+%\RequirePackage[textfont={normalfont}, labelfont={sc,bf}, labelsep=period, parskip=1pt, aboveskip=5pt,
+%indention=18pt]{caption}
+
+\RequirePackage{supertabular}
+\RequirePackage{longtable}
+\RequirePackage{booktabs}
+\RequirePackage{multirow}
+\RequirePackage[section]{placeins}
+\RequirePackage{graphicx}
+\RequirePackage{multicol}
+\RequirePackage{xcolor}
+% colors
+\definecolor{red}{rgb}{1,0,0}
+
+\RequirePackage{verbatim}
+\RequirePackage{shortvrb} % using \MakeShortVerb{\|} and \DeleteShortVerb{\|} you can define a new verbatim
+ % environment setter
+
+\RequirePackage{geometry}
+\geometry{
+ a4paper,
+ total={150mm,240mm},
+ left=20mm,
+ %top=20mm,
+}
+\parskip=1mm
+%\parindent=0mm
+\usepackage{setspace}
+
+\RequirePackage[all]{xy}
+
+\RequirePackage{tcolorbox}
+
+% encabezados
+\RequirePackage{fancyhdr}
+\pagestyle{fancy}
+\renewcommand{\headrulewidth}{0.4pt}
+\fancyhf{}
+\fancyhead[RO,LE]{\thepage}
+\fancyhead[LO]{\nouppercase{\rightmark}} % Estilo: 1.3. Seccion primera
+\fancyhead[RE]{\nouppercase{\leftmark}} % Estilo: Capitulo 1. Primer Capitulo
+
+% settings
+\RequirePackage{kantlipsum}
+\RequirePackage{appendix}
+%\RequirePackage[none]{hyphenat} %para que justifique el texto, ademas hay que agregar \sloppy luego del \begin{document}
+
+% font
+%\RequirePackage[bitstream-charter]{mathdesign}
+%\RequirePackage{kpfonts}
+
+\RequirePackage{varioref}
+%\labelformat{section}{secci{\'o}n~#1}
+%\labelformat{subsection}{secci{\'o}n~#1}
+%\labelformat{equation}{(#1)}
+%\labelformat{figure}{f\/igura~#1}
+%\labelformat{table}{tabla~#1}
+% Para modificar el separador de caption, ie. Figura 1. en lugar de Figura 1:
+
+\RequirePackage[breaklinks, colorlinks=true, pdfstartview=FitV, linkcolor=black, citecolor=black,
+urlcolor=black]{hyperref}
+% \renewcommand*{\backref}[1]{}
+% \renewcommand*{\backrefalt}[4]{
+% \ifcase #1 (No citado.)
+% \or (Citado en página~#2.)
+% \else (Citado en páginas #2.)
+% \fi%
+% }
+% \renewcommand*{\backrefsep}{, }
+% \renewcommand*{\backreftwosep}{ y~}
+% \renewcommand*{\backreflastsep}{ y~}
+
+% to define depth of section in TOC
+%\setcounter{secnumdepth}{3} % para que ponga 1.1.1.1.
+%\setcounter{tocdepth}{4} % para que añadir las secciones en el índice
+
+% available levels
+% -1 = partes
+%0 = capítulos
+%1 = secciones
+%2 = subsecciones
+%3 = subsubsecciones
+%4 = párrafos
+%--------------------------------------------------------------------------------------
+
+% some defined commands
+\newcommand{\R}{\mathbb{R}}
+\newcommand{\Z}{\mathbb{Z}}
+\newcommand{\Q}{\mathbb{Q}}
+\newcommand{\N}{\mathbb{N}}
+\newcommand{\I}{\mathbb{I}}
+\newcommand{\raya}{\rule{2cm}{0.01cm}\\}
+\newcommand{\ds}{\displaystyle}
+\newcommand{\sen}{\mathop{\rm sen}\nolimits}
+%\newcommand{\tanh}{\mathop{\rm tan}\nolimits}
+\newcommand{\senh}{\mathop{\rm senh}\nolimits}
+\newcommand{\arcsen}{\mathop{\rm arcsen}\nolimits}
+\newcommand{\arcsec}{\mathop{\rm arcsec}\nolimits}
+\newcommand{\A}{\,\textup{\r{A}}}
+\newcommand{\C}{\,^{\circ}C}
+\newcommand{\degree}{\,^{\circ}}
+\newcommand{\erfc}{\mathop{\rm erfc}\nolimits}
+\newcommand{\erf}{\mathop{\rm erf}\nolimits}
+\newcommand{\rb}[1]{\raisebox{-.4ex}[0pt]{#1}}
+
+\RequirePackage{minitoc}
+
+% define white pages after chapters if needed when using openright book option
+\makeatletter
+\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
+ \hbox{}
+ \vspace*{\fill}
+ % \begin{center}
+ % Esta página se ha dejado en blanco intencionalmente.
+ % \end{center}
+ \vspace*{\fill}
+ \thispagestyle{empty}
+ \newpage
+ \if@twocolumn\hbox{}\newpage\fi\fi\fi}
+\makeatother
+